<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', function()
{
	return View::make('hello');
});
Route::get('users', function()
{
    return 'Users!';
});
Route::get('api','ApiController@index');
// route to process the api
Route::post('api/fromPc',array('before' => 'csrf','uses'=>'ApiController@fromPc'));
// route to process the api
Route::post('api/check',array('uses'=>'ApiController@check'));

//Settings: show form to create settings
Route::get( '/api/new', array(
    'as' => 'api.new',
    'uses' => 'ApiController@add'
) );
 
//Settings: create a new setting
Route::post( '/api', array(
    'as' => 'api.create',
    'uses' => 'ApiController@create'
) );
Route::post('api/savePinU',array('before' => 'csrf','uses'=>'ApiController@savePinU'));
